﻿
namespace NLite.Mini.Fluent
{
    /// <summary>
    /// 组件表达是接口
    /// </summary>
    public interface IComponentExpression : IRegistryExpression
    {
        /// <summary>
        /// 设置组件生命周期类型
        /// </summary>
        /// <param name="lifestyle"></param>
        /// <returns></returns>
        IComponentExpression Lifestyle(LifestyleFlags lifestyle);

        /// <summary>
        /// 设置组件工厂类型
        /// </summary>
        /// <param name="activator"></param>
        /// <returns></returns>
        IComponentExpression Activator(string activator);

        /// <summary>
        /// 添加组件的一个元数据项
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        IComponentExpression Add(string key, object value);
    }
}
